<html>
<body>


<?php
include('header.php');
?>

<div class="content">
	<div class="wrap">
		<div class="content-top">
				<div class="listview_1_of_3 images_1_of_3">
					<h3>即将上映 电影</h3>

					<?php 
					$qry3=mysqli_query($con,"select * from tbl_news");
					
					while($n=mysqli_fetch_array($qry3))
					{
					?>

				<div class="content-left">
					<div class="listimg listimg_1_of_2">
						 <img src="/admin/<?php echo $n['attachment'];?>">
					</div>
					<div class="text list_1_of_2">
						  <div class="extra-wrap">
						  	<span style="text-color:#000" class="data">
                                <strong><?php echo $n['name'];?></strong>
                                <br>
						  	<span style="text-color:#000" class="data">
                                <strong>主演 :<?php echo $n['cast'];?></strong>
                                <br>
                                <div class="data">上映日期 :<?php echo $n['news_date'];?></div>
                                <span class="text-top">简介：
                                    <?php echo $n['description'];?>
                                </span>
                          </div>
					</div>
					<div class="clear"></div>
				</div>
				<?php
				}
				?>
				
			
		</div>				
		<div class="listview_1_of_3 images_1_of_3">
					<h3>热门预告片</h3>
						<div class="middle-list">
					<?php
                    //MySQL RAND()函数负责为每个表行产生一个随机值。
                    //之后，ORDER BY子句有助于按照MySQL中RAND()函数产生的随机值或数字对所有表的行进行排序。
					$qry4=mysqli_query($con,"select * from tbl_movie order by rand()");

					while($nm=mysqli_fetch_array($qry4))
					{
					?>
					
						<div class="listimg1">
							 <a target="_blank" href="<?php echo $nm['video_url'];?>">
                                 <img src="/Resource/<?php echo $nm['image'];?>" alt=""/>
                             </a>
							&nbsp;&nbsp;&nbsp; <a target="_blank" href="<?php echo $nm['video_url'];?>" class="link">
                                <?php echo $nm['movie_name'];?>
                            </a>
						</div>
						<?php
					}
					?>
					</div>
					
					
		</div>			
		<?php include('movie_sidebar.php');?>
	</div>
</div>
<?php include('footer.php');?>
</div>
